//
//  SYDaiPiGaiTopView.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/4/25.
//  Copyright © 2019年 SanYi. All rights reserved.
//

#import "SYDaiPiGaiTopView.h"

@interface SYDaiPiGaiTopView ()
@property (weak, nonatomic) IBOutlet UIButton *huoquBtn;
@property (weak, nonatomic) IBOutlet UIButton *tuihuiBtn;


@end


@implementation SYDaiPiGaiTopView

- (void)awakeFromNib {
    [super awakeFromNib];
    
    _huoquBtn.layer.borderWidth = 1;
    _huoquBtn.layer.borderColor = [UIColor colorWithHexString:@"#20B097"].CGColor;
    _huoquBtn.layer.cornerRadius = 5;
    _huoquBtn.layer.masksToBounds = YES;
    
    _tuihuiBtn.layer.borderWidth = 1;
    _tuihuiBtn.layer.borderColor = [UIColor colorWithHexString:@"#999999"].CGColor;
    _tuihuiBtn.layer.cornerRadius = 5;
    _tuihuiBtn.layer.masksToBounds = YES;
    
}


//60显示答案   61自动批注 62 获取试题  63退回试题
- (IBAction)btnSelectClick:(UIButton *)sender {
    SYDaiPiGaiTopViewType type = -1;
    NSInteger tag = sender.tag;
    switch (tag) {
        case 60:
            sender.selected =!sender.selected;
            type = SYDaiPiGaiTopViewTypeXianShiDan;
            break;
        case 61:
            sender.selected =!sender.selected;
            type = SYDaiPiGaiTopViewTypeZiDong;
            break;
        case 62:
            type = SYDaiPiGaiTopViewTypeHuoQu;
            break;
        case 63:
            type = SYDaiPiGaiTopViewTypeTuiHui;
            break;
            
        default:
            break;
    }
    
    if ([self.delegate respondsToSelector:@selector(selectBtnType:)]) {
        [self.delegate selectBtnType:type];
    }
}

@end

















